/**
 * @author luguoxiang
 * @date 2022/7/5
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
import { createApi, request } from '@/soar';

const basePath = '/system/role';
const subject = '角色';
const api = createApi(basePath, subject);

export default {
  ...api,
  clearCache: () => request.post(`${basePath}/clear-cache`),
  setMenuIds: (data) => request.post(`${basePath}/set-menu-ids`, { data }),
  getMenuIds: (roleId) => request.get(`${basePath}/get-menu-ids`, { params: { roleId } }),
  setDataScope: (data) => request.post(`${basePath}/set-data-scope`, { data }),
  getDataScope: (roleId) => request.get(`${basePath}/get-data-scope`, { params: { roleId } }),
};
